import {
  mapState,
  mapMutations
} from 'vuex'

import smp from '@/store.js'

export default {
  store: smp,
  computed:{
    ...mapState({
      activeIndex:state => state.activeIndex,
      userToken : state => state.userToken,
      // mode: state => state.mode,
      equipmentId:state => state.equipmentId,
      statusColor:state => state.statusColor,
      kLabel:state => state.kLabel,
      menuLists: state => state.menuList
    })
  },

  methods: {
    ...mapMutations({

      setMenuList:'setMenuList',
      
      setActiveIndex:'setActiveIndex',
      getActiveIndex:'getActiveIndex',

      // TOKEN
      setUserToken:'setUserToken',
      getUserToken:'getUserToken',

      // mode
      getMode:'getMode',
      setMode:'setMode',
      // 状态
      setStatusColor:'setStatusColor',
      getStatusColor:"getStatusColor",

      setEquipmentId:'setEquipmentId',
      getEquipmentId:'getEquipmentId',

      getkLabel:"getkLabel",
      setkLabel:"setkLabel"
    }),
  }
}
